<layout name="layout" />

<script src="{$uri}Public/Scripts/PSI/Factory/MainForm.js?dt={$dtFlag}"
	type="text/javascript"></script>
<script
	src="{$uri}Public/Scripts/PSI/Factory/CategoryEditForm.js?dt={$dtFlag}"
	type="text/javascript"></script>
<script
	src="{$uri}Public/Scripts/PSI/Factory/FactoryEditForm.js?dt={$dtFlag}"
	type="text/javascript"></script>

<script>
	Ext.onReady(function() {
		PSI.Const.PROD_NAME = "{$productionName}";

		var app = Ext.create("PSI.App", {
			userName : "{$loginUserName}",
			productionName : "{$productionName}"
		});

		var permission = {
			addCategory : "{$pAddCategory}",
			editCategory : "{$pEditCategory}",
			deleteCategory : "{$pDeleteCategory}",
			add : "{$pAdd}",
			edit : "{$pEdit}",
			del : "{$pDelete}"
		};

		app.add(Ext.create("PSI.Factory.MainForm", {
			permission : permission
		}));
		app.setAppHeader({
			title : "{$title}"
		});
	});
</script>